import com.itheima.dao.UserDao;
import com.itheima.domain.User;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import java.util.HashMap;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("classpath:spring/applicationContext-dao.xml")
public class test1 {
    @Autowired
    private UserDao userDao;

    @Test
    public void test1() {
        userDao.findById(8);
    }


    @Test
    public void test2() {
      /*  HashMap<Integer, User> users = new HashMap<Integer, User>();
        users.put(1, new User("张三", 25));
        users.put(3, new User("李四", 22));
        users.put(2, new User("王五", 28));
        users.put(4, new User("赵六", 18));

        System.out.println( "排序前：" + users);

        HashMap<Integer, User> sorHashMap = sortHashMap(users);
        System.out.println("排序后：" + sorHashMap);
      
    }

    private HashMap<Integer,User> sortHashMap(HashMap<Integer, User> users) {
    }*/
    }
}